﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lazy2
{
    class Program
    {
        struct student
        {
            private string name;
            private string phone;
            private string site;
            public string Name
            {
                get
                { return name; }
                set
                { name = value; }
            }
            public string Phone
            {
                get
                { return phone; }
                set
                { phone = value; }
            }
            public string Site
            {
                get
                { return site; }
                set
                { site = value; }
            }
        }
        static void Main(string[] args)
        {
            Dome01();
            Dome02();
            //结构体中值类型：作为参数数据类型，形参数据改变实参不变
            //引用类中作为参数数据类型，形参数据改变实参数据一起改变
        }
        static void Dome01() {
            student p1 = new student();
            p1.Name = "pdd";
            p1.Phone = "123456789";
            p1.Site = "巨龙冲击";
            student p2 = new student();
            p2 = p1;
            p2.Name = "dsm";
            Console.WriteLine("p1的内容:" + "名字：" + p1.Name + "电话：" + p1.Phone + "地址：" + p1.Site + "   " + "p2的内容:" + "名字：" + p2.Name + "电话：" + p2.Phone + "地址：" + p2.Site);
            Console.ReadKey();
        }
        static void Dome02() {
            PersonClass p3 = new PersonClass();
            p3.NAme = "卢本伟";
            p3.PHone = "987654321";
            p3.SIte = "伞兵广场";
            PersonClass p4 = new PersonClass();
            p4 = p3;
            p4.NAme = "马×虫";
            Console.WriteLine("p3的内容:" + "名字：" + p3.NAme + "电话：" + p3.PHone + "地址：" + p3.SIte + "   " + "p4的内容:" + "名字：" + p4.NAme + "电话：" + p4.PHone + "地址：" + p4.SIte);
            Console.ReadKey();
        }
    }
}
